package com.yizhubao.app.models;

import com.yizhubao.app.beans.WXLoginBean;
import com.yizhubao.app.utils.net.BaseObserver;
import com.yizhubao.app.utils.net.HttpUtils;
import com.yizhubao.app.utils.net.LifeCycleEvent;
import com.yizhubao.app.utils.net.RetrofitUtil;

import java.util.Map;

import io.reactivex.Observable;
import io.reactivex.subjects.PublishSubject;

/**
 * @author Pacy.
 * Date: 2021/6/13/013
 * Time: 20:28
 * Mail pengwwe457621023@qq.com
 * Info 发送验证码的model
 */
public class SendCodeModel {
    public void sendCodeRequest(Map<String, Object> parmas, BaseObserver observer, PublishSubject<LifeCycleEvent> lifecycleSubject) {
        Observable observable = RetrofitUtil.getApiService().sendCodeRequest(HttpUtils.buildParams(parmas));
        RetrofitUtil.composeToSubscribe(observable, observer, lifecycleSubject);
    }
}
